USE master;
GO

SET NOCOUNT ON;
GO

SELECT
	-- st.text,
    qp.query_plan,
    qs.last_execution_time,
    qp.query_plan.value('(//@EstimateRows)[1]', 'varchar(128)') AS estimated_rows,
    qs.last_rows
FROM sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS st
CROSS APPLY sys.dm_exec_query_plan(plan_handle) AS qp
WHERE DATEDIFF(mi, qs.last_execution_time, GETDATE()) < 24;  -- within the last 24 hours